//
//  TibTestAppDelegate.m
//  TibTest
//
//  Created by Tom Meyer on 4/24/10.
//  Copyright T Ontological Media 2010. All rights reserved.
//

#import <UIKit/UITextView.h>
#import <UIKit/UIColor.h>
#import <UIKit/UIFont.h>
#import "TibTestAppDelegate.h"

@implementation MainView

- (id) initWithFrame:(CGRect) rect {
	self = [ super initWithFrame: rect ];
	
	if (self != nil) {
		
		
		textView = [ [ UITextView alloc] initWithFrame: rect ];
		UIFont* tibFont = [UIFont fontWithName: @"DDC Uchen" size: 22];
		if (tibFont != nil) {
			[ textView setFont:tibFont];
			textView.text = @"\u0F04\u0F05\u0F0D \u0F0D\u0F60\u0F55\u0F42\u0F66\u0F0B\u0F58\u0F0B\uF397\u0F63\u0F0B\u0F58\u0F0B\u0F63\u0F0B\u0F56\uF43A\u0F51\u0F0B\u0F54\u0F0B\n\uF4BA\u0F42\u0F0B\u0F60\u0F5A\u0F63\u0F0B\u0F56\u0F0B\uF3ED\u0F0B\uF5BE\u0F0B\uF53F\u0F0B\u0F42\uF3B7\u0F42\u0F0B\u0F54\uF591\u0F0B\uF5AA\u0F58\u0F0B\u0F54\u0F0B\uF473\u0F0D\u0F0D";
		} else {
			textView.text = @"Failed.";
		}
			
		
		[ self addSubview: textView ];
	}
	return self;
}					  
					  
					  
- (void)dealloc {	
	[textView release];
	[super dealloc];
}
@end

@implementation TibTestAppDelegate

@synthesize window;


- (void)applicationDidFinishLaunching:(UIApplication *)application {    
	CGRect screenBounds = [ [ UIScreen mainScreen ] applicationFrame ];
	CGRect windowBounds = screenBounds;
	windowBounds.origin.y = 0.0;
	
	self.window = [ [ [ UIWindow alloc ] initWithFrame: screenBounds ] autorelease ];
	
	myMainView = [ [ MainView alloc ] initWithFrame: windowBounds ];
	[ window addSubview: myMainView ];
	[ window makeKeyAndVisible ];
}
	


- (void)dealloc {
	[ myMainView release];
    [ window release ];
    [ super dealloc ];
}
					  

@end
